import Vue from 'vue';
import Router from 'vue-router';
import Home from '../pages/home';
import foodDetail from '../pages/foodDetail.vue';

Vue.use(Router);

export default new Router({
  routes: [
    {
      path: '/', //链接路径
      name: 'Home', //路由名称，
      component: Home, //对应的组件模板
    },
    {
      path: '/src/pages/foodDetail', //链接路径
      name: 'foodDetail', //路由名称，
      component: foodDetail, //对应的组件模板
    },
  ],
});
